package com.manage.common.core.constants;

/**
 * @author zhangqing
 * @version V1.0
 * @description 常量类
 * @date 4/12/2020 7:50 PM
 */
public class Constant {

    /**
     * JWT存储权限前缀
     */
    public static final String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT存储权限属性
     */
    public static final String AUTHORITY_CLAIM_NAME = "authorities";

    public static final String CURRENT_USER = "current_user";

    public static final String DEFAULT_CODE_KEY = "random_code_";

    /**
     * JWT令牌前缀
     */
    public static final String JWT_TOKEN_PREFIX = "Bearer ";

    /**
     * 授权模式
     */
    public static final String GRANT_TYPE = "grant_type";

    /**
     * 系统管理client_id
     */
    public static final String SYSTEM_CLIENT_ID = "system-web";

    /**
     * 资源服务器key,secret,用于校验token时使用
     */
    public static final String RESOURCE_CLIENT_ID = "manage-gateway";

    public static final String RESOURCE_CLIENT_SECRET = "2021!@#";

    /**
     * 后台管理接口路径匹配
     */
    public static final String SYSTEM_URL_PATTERN = "/system/**";

    /**
     * 统一认证服务路径匹配
     */
    public static final String OAUTH_URL_PATTERN = "/oauth/**";

    /**
     * 认证信息Http请求头
     */
    public static final String JWT_TOKEN_HEADER = "Authorization";

    /**
     * 正式运行环境
     */
    public static final String PRO = "pro";

    /**
     * 本地运行环境
     */
    public static final String DEV = "dev";

    /**
     * 测试运行环境
     */
    public static final String TEST = "test";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * redis生成主键key
     */
    public static final String SYS_LOGIN_LOG_KEY = "sys_login_log_key";
    public static final String SYS_OPERATE_LOG_KEY = "sys_operate_log_key";
    public static final String SYS_USER_KEY = "sys_user_key";
    public static final String SYS_ROLE_KEY = "sys_role_key";

    // 管理员角色标示
    public static final String ADMIN = "admin";


}
